package com.cty.dao;

import com.cty.pojo.User;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @Auther: cty
 * @Date: 2020/2/22 10:26
 * @Description:
 * @version: 1.0
 */
public interface UserDao {
    /**
     * 获取用户数据进行用户校验
     * @param uname
     * @param pwd
     * @return
     */
    User checkUserLoginDao(String uname, String pwd);

    /**
     * 用户密码修改
     * @param uid
     * @param newPwd
     * @return
     */
    int userChangePwd(int uid, String newPwd);

    /**
     * 获取所有用户信息
     * @return
     */
    List<User> userShowDao();

    /**
     * 将注册用户信息存入数据库
     * @param req
     * @param resp
     * @return
     */
    int userRegDao(HttpServletRequest req, HttpServletResponse resp);
}
